/*
 * @author: sanbao
 * @Date: 2022-07-31 15:52:51
 */
import request from "@/utils/request";
//
const getcarousellist = () => {
    return request({
        url: 'resources/carousel',
        method: 'POST',
    })
}
//
const getPromoProductlist = (data) => {
    // http: //101.132.181.9/api/product/getPromoProduct
    return request({
        url: 'product/getPromoProduct',
        method: 'POST',
        data
    })
}
//
const getgetHotProduct = (data) => {
    // http: //101.132.181.9/api/product/getHotProduct
    return request({
        url: 'product/getHotProduct',
        method: 'POST',
        data
    })
}
//
const postgetCategory = () => {
    //  http: //101.132.181.9/api/product/getCategory
    return request({
        url: 'product/getCategory',
        method: 'POST',
    })
}
//
const postgetAllProduct = (data) => {
    // http: //101.132.181.9/api/product/getAllProduct
    return request({
        url: 'product/getAllProduct',
        method: 'POST',
        data
    })
}
//
const postgetProductByCategory = (data) => {
    // http: //101.132.181.9/api/product/getProductByCategory
    return request({
        url: 'product/getProductByCategory',
        method: 'POST',
        data
    })
}
//
const getdocs = () => {
    // http: //101.132.181.9/api/public/docs/README.md
    return request({
        url: 'public/docs/README.md',
        method: 'GET',
    })
}
//详情 轮播图
const postgetDetailsPicture = (data) => {
    // http: //101.132.181.9/api/product/getDetailsPicture
    return request({
        url: 'product/getDetailsPicture',
        method: 'POST',
        data
    })
}
//详情数据
const getDetails = (data) => {
    // http: //101.132.181.9/api/product/getDetails
    return request({
        url: 'product/getDetails',
        method: 'POST',
        data
    })
}
export default {
    getcarousellist,
    getPromoProductlist,
    getgetHotProduct,
    postgetCategory,
    postgetAllProduct,
    postgetProductByCategory,
    getdocs,
    postgetDetailsPicture,
    getDetails
};